<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
</head>
<body>

   <form id="importForm" method="post" enctype="multipart/form-data">
	<table class="add-user">
		<tr>
			<td class="m-info-title">
				上传文件:
				<span class="red">*</span>
				:
			</td>
			<td class="m-info-content">
				<input type="file" name="uploadFile" id="fileIS" size="28" />
			</td>
		</tr>
		<tr>
			<td colspan="2">
				<div class="Mbutton25 createButton" id="import">上传</div>
			</td>
		</tr>
	</table>
  </form>
  <script>
	  $(document).ready(function() {
			
			$("#import").click(function() { 
				var options = {  
	                  url : "/bdCheliang/importExcel",
	                  type : "POST",//提交方式  
	                  success : function(msg) {//调用Action后返回过来的数据  
	                      if(msg == "success"){
	                      	$.messager.alert('提示', '导入成功', 'info', function() {
	                       		    $('#devMaterielTable').datagrid("reload");
									$("#addwindom").window("close");
							});
	                      	$("#addwindom").mask("hide");
	                      }else{
	                      	$.messager.alert('提示', '导入失败,' + msg, 'error', function() {
								});
	                      	$("#addwindom").mask("hide");
	                      }
	                  },
	                  error : function(){
	                  	$.messager.alert('提示', '导入失败', 'error', function() {
							});
	                  	$("#addwindom").mask("hide");
	                  }
	              };  
	              $("#importForm").ajaxSubmit(options);//绑定页面中form表单的id         
	              $("#addwindom").mask();
			});
		}); 
  </script>
</body>
</html>
